# sdk path
SYSROOT = $(shell pwd)/../hmos-third/sdk/sysroot
LLVM = $(shell which clang)/../..

# 架构
ARCH = aarch64

# compile path
GCC = clang
GXX = clang++
AR = llvm-ar
AS = llvm-as
NM = llvm-nm
RANLIB = llvm-ranlib
STRIP = llvm-strip
OBJDUMP = llvm-objdump
LD = ld.lld

# 平台编译项和路径:
EXT_CFLAGS = --target=aarch64-linux-ohos -march=armv8-a --sysroot=$(SYSROOT)
EXT_INCS += -I$(SYSROOT)/usr/include/aarch64-linux-ohos
EXT_INCS += -I$(LLVM)/include
EXT_LIBS += -L$(SYSROOT)/usr/lib/aarch64-linux-ohos
EXT_LIBS += -L$(LLVM)/lib/aarch64-linux-ohos/c++
EXT_LIBS += -L$(LLVM)/lib

# 修复找不到-lgcc报错
EXT_LIBS += -L$(shell pwd)/../hmos-third/sdk/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x
